module.exports = () => {
    var result = {}
    var userAgent = navigator.userAgent.toLowerCase();

    result.wechat = userAgent.match(/micromessenger/i) != null

    result.QQBrowser = userAgent.match(/MQQBrowser/i) != null

    var isIpad = userAgent.match(/ipad/i) != null
    var isIphoneOs = userAgent.match(/iphone os/i) != null
    var isMidp = userAgent.match(/midp/i) != null
    var isUc7 = userAgent.match(/rv:1.2.3.4/i) != null
    var isUc = userAgent.match(/ucweb/i) != null
    var isAndroid = userAgent.match(/android/i) != null
    var isCE = userAgent.match(/windows ce/i) != null
    var isWM = userAgent.match(/windows mobile/i) != null
    result.mobile = result.wechat || result.QQBrowser || isIpad || isIphoneOs || isMidp || isUc7 || isUc || isAndroid || isCE || isWM

    result.Opera = userAgent.indexOf('opera') > -1;

    result.FireFox = userAgent.indexOf("firefox") > -1

    result.Chrome = userAgent.indexOf("chrome") > -1

    result.Safari = !result.Chrome && !result.QQBrowser && userAgent.indexOf("safari") > -1

    result.IE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("msie") > -1 && !isOpera

    result.Maxthon = userAgent.indexOf("maxthon") > -1

    return result
}
